package com.lolan.training.common.constants;

public enum ErrorCode {

	SUCCESS(0,"操作成功"),

	// -------------------------------------------网络锁------------------------------------------
	ERROR(-1,"锁程序异常，请联系管理员！"),
	E400001(400001,"参数检查不通过"),
	E400002(400002," 被修改数据不存在"),
	E400003(400003,"配置增加失败"),
	E400004(400004,"修改配置时，配置数据有关联的锁存在，修改或删除失败"),
	E400005(400005,"增加配置时，该配置已存在"),
	E400006(400006,"锁信息增加失败"),
	E400007(400007,"信息删除失败，可能是已被删除"),
	E400008(400008,"加锁时，初始化锁信息失败"),
	E400009(400009,"尝试写入锁信息时，出现程序错误"),
	E400010(400010,"已有相同任务在进行"),
	E400011(400011,"加锁失败，并发太大，稍后重试"),
	E400012(400012,"存在互斥任务，加锁失败"),
	E400013(400013,"加锁时，写入数据库失败"),
	E400014(400014,"正在修改配置信息，加锁失败"),
	E400015(400015,"删除锁信息失败，解锁失败"),
	E400016(400016,"锁信息与申请的解锁的锁信息不同，解锁失败"),
	E400017(400017,"从数据库初始化锁信息失败"),
	E400018(400018,"调用初始化锁接口出现程序错误"),
	E400019(400019,"已经有其他线程在进行初始化操作"),
	E400020(400020,"无法获取到互斥功能的锁信息，加锁失败"),
	E400021(400021,"配置已经修改成功，但是会延迟生效"),


	// -------------------------------------------文档格式转换------------------------------------------
	E900001(900001, "Please select a file to upload."),
	E900002(900002, "Please select an output format."),
	E900003(900003, "targetFormat must not be null"),
	E900004(900004, "File conversion service error"),
	E999999(999999, "File conversion service error"),

	// -------------------------------------------宽表搜索------------------------------------------
	E600001(600001, "ES服务连接错误，索引创建失败"),
	E600002(600002, "ES服务连接错误，查询失败"),
	E600003(600003, "Domain参数错误，下钻查询不应该超过两层"),
	E600004(600004, "Domain参数错误，非逻辑计算符domain元祖长度应为3"),
	E600005(600005, "ES参数错误，参数不应为空"),
	E600006(600006, "ES参数错误，分组深度不应该超过10层"),
	E600007(600007, "ES参数错误，使用innerHit时，请指明子表"),
	E600008(600008, "ES查询错误，索引不存在"),
	E600009(600009, "ES数据同步错误"),
	E600010(600010, "ES查询错误，field深度最多支持两层"),
	E600011(600011, "Domain参数错误，日期字段格式化失败，非yyyy-MM-dd格式或iso标准格式"),
	E600012(600012, "Domain参数错误，时间字段格式化失败，非yyyy-MM-dd HH:mm:ss格式或iso标准格式"),

	// es查询状态返回异常
	E600400(600400, "查询发生错误，请联系管理员"),
	E600404(600404, "es索引不存在，请先发布es设置");

	private int code;

	private String message;

	private ErrorCode(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}




}
